<!DOCTYPE html>
<html>
<head lang="en">
  <meta charset="UTF-8">
  <title>用友在线运维我的回答</title>
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport"
        content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <meta name="format-detection" content="telephone=no">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp"/>
  <script src="static/sool/js/global.js"></script>
  <script>
    JsAndCssUtil.importCss("/static/css/amazeui");
    JsAndCssUtil.importCss("/static/css/font-awesome");
    JsAndCssUtil.importCss("/static/css/font-glyphicons");
    JsAndCssUtil.importCss("/static/sool/style/basic");
    JsAndCssUtil.importCss("/static/sool/style/myAnswer");
  </script>

</head>
<body>

<!--头 部logo与我要提问的显示-->
<div id="ContainerId">
  <script type="text/javascript">
    renderNavBar();
  </script>
</div>

<!--回答状态的显示-->
<div class="am-g am-g-fixed blog-g-fixed">
  <div class="am-u-md-8">
    <article>
      <h3 class="am-article-title blog-title">
        <p class="am-danger"><i class="fa fa-comments am-icon-sm am-danger"></i> 我的回答</p>
      </h3>
      <ul  class="am-nav am-nav-pills" id="subMyAnswerList">
        <li class="am-active" value="0" id="a-all"><a href="#s0">全部</a></li>
        <li id="a-adopt" value="1"><a href="#s1">已采纳</a></li>
        <li id="a-unadopt" value="2"><a href="#s2">未采纳</a></li>
        <li id="a-handling" value="3"><a href="#s3">待追答</a></li>
      </ul>
    </article>

      <hr class="am-divider blog-hr am-hrjanju">

      <article data-am-scrollspy="{animation:'slide-left', repeat: false}" id="myAnswerList">
          <!--通过article_template模板加载显示内容-->
      </article>

    <ul class="am-pagination am-pagination-centered" id="pagemes">

    </ul>
  </div>

  <!--相似问题-->
  <div class="am-u-md-4 blog-sidebar">
    <div class="am-panel-group">
      <section class="am-panel am-panel-default" data-am-scrollspy="{animation: 'scale-up', repeat: false}">
        <div class="am-panel-hd"><i class="fa fa-bars am-time"></i> <span class="am-panel-hd-text">精华问题</span></div>
        <div class="am-panel-bd" id="xsQuestionList">

        </div>
      </section>
    </div>
  </div>

</div>

<!--底部的显示-->
<footer class="am-margin-top doc-footer-color">
  <hr/>
  <p class="am-text-center">
    <small>
      @copy;2015用友能源科技有限公司版权所有 京ICP备15038140号-1   官方微博   用户协议
    </small>
  </p>
</footer>

<!--引入JS外部文件-->
<script type="text/javascript">
  JsAndCssUtil.importJs("/static/sool/js/jquery");
  JsAndCssUtil.importJs("/static/js/amazeui.min");
  JsAndCssUtil.importJs("/static/js/handlebars.min");
  /*加载logo和NAV和search*/

  JsAndCssUtil.importJs("/static/sool/js/nav");

  /*加载引入公共的useID的文件*/
  JsAndCssUtil.importJs("/static/sool/data/bindingData");
  JsAndCssUtil.importJs("/static/sool/data/myAnswer");
</script>

<!--[if lt IE 9]>
<script>
  JsAndCssUtil.importJs("/static/js/modernizr-2010.07.16dev");
  JsAndCssUtil.importJs("/static/js/amazeui.ie8polyfill.min");
</script>
<![endif]-->

<!--回答列表的展现（包含已采纳和未采纳）-->
<script id="article_template" type="text/x-handlebars-template">
  {{#each this}}
    {{#compare adopt}}
      <div class="question-item-container">
        <div>
          <a class="a" href="{{qa_link}}" adopt="{{adopt}}" status="{{status}}" pk_sool_question="{{pk_sool_question}}">
            <span class="am-title blog-title">
              {{question_title}}
            </span>
          </a>
          <p class="ma-i-float ma-i-color"><i class="fa fa-check am-icon-sm"></i>已采纳</p>
        </div>
          <span class="am-title blog-title-1">
            <!--已解决-->
          </span>
        <ul class="am-pagination blog-pagination am-miaoshujianju">
          <li>
            <p class="blog-g-text answer-p-width">
              <span class="doc-ans-color">回答：</span>
              {{short_solution}}
            </p>
          </li>
        </ul>
        <p class="am-article-meta blog-meta">
          <i class="fa fa-clock-o am-icon-sm doc-time"></i>
          <span class="doc-time-time">发布时间：</span>
          <span class="doc-time-text">{{recoverytime}}</span>&nbsp;&nbsp;&nbsp;&nbsp;
          <i class="fa fa-comment-o am-icon-sm am-huida"></i>
          <span class="doc-time-answer">回答数：</span>
          <span class="doc-time-text">{{answercount}}</span>&nbsp;&nbsp;&nbsp;&nbsp;
          <!--<i class="fa fa-male am-icon-sm am-user"></i> -->
          <!--提问者： <a href="#">米莉娅</a>-->

        </p>
      </div>
    {{else}}
        <div class="question-item-container">
          <div>
            <a class="a" href="{{qa_link}}" adopt="{{adopt}}" status="{{status}}" pk_sool_question="{{pk_sool_question}}">
                <span class="am-title blog-title">
                  {{question_title}}
                </span>
            </a>
            <!--<p class="ma-i-float ma-i-color"><i class="fa fa-check am-icon-sm"></i>已采纳</p>-->
          </div>
              <span class="am-title blog-title-1">
                <!--已解决-->
              </span>
          <ul class="am-pagination blog-pagination am-miaoshujianju">
            <li>
              <p class="blog-g-text answer-p-width">
                <span class="doc-ans-color">回答：</span>
                {{short_solution}}
              </p>
            </li>
          </ul>
          <p class="am-article-meta blog-meta">
            <i class="fa fa-clock-o am-icon-sm doc-time"></i>
            <span class="doc-time-time">发布时间：</span>
            <span class="doc-time-text">{{recoverytime}}</span>&nbsp;&nbsp;&nbsp;&nbsp;
            <i class="fa fa-comment-o am-icon-sm am-huida"></i>
            <span class="doc-time-answer">回答数：</span>
            <span class="doc-time-text">{{answercount}}</span>&nbsp;&nbsp;&nbsp;&nbsp;
            <!--<i class="fa fa-male am-icon-sm am-user"></i> -->
            <!--提问者： <a href="#">米莉娅</a>-->
          </p>
        </div>
    {{/compare}}
  {{/each}}
</script>

<!--待处理状态的展现-->
<script id="answer_template" type="text/x-handlebars-template">
  {{#each this}}
    <div class="question-item-container">
      <a class="a" href="{{qa_link}}" status="{{status}}" pk_sool_question_farther="{{pk_sool_question_farther}}" pk_sool_question_son="{{pk_sool_question_son}}">
        <span class="am-title blog-title">
          {{sool_question_title_farther}}
        </span>
      </a>
        <span class="am-title blog-title-1">
            <!--已解决-->
        </span>
      <ul class="am-pagination blog-pagination">
        <li>
          <p class="blog-g-text">
            <span class="doc-ans-color">追问：</span>
           {{{sool_question_title_son}}}
          </p>
        </li>
      </ul>
      <p class="am-article-meta blog-meta">
        <i class="fa fa-clock-o am-icon-sm doc-time"></i>
        <span class="doc-time-time">发布时间：</span>
        <span class="doc-time-text">{{submissiontime}}</span>
        &nbsp;&nbsp;&nbsp;&nbsp;
        <i class="fa fa-comment-o  am-huida"></i>
        <span class="doc-time-answer">回答数： </span>
        <span class="doc-time-text">{{answercount}}</span>
        &nbsp;&nbsp;&nbsp;&nbsp;
        <!--<i class="fa fa-male am-icon-sm am-user"></i> -->
        <!--提问者： <a href="#">米莉娅</a>-->
      </p>
    </div>
  {{/each}}

</script>

<!--相似问题的展现-->
<script id="li_template" type="text/x-handlebars-template">

  <ul class="short-list">
    {{#each this}}
    <li class="am-article-meta blog-meta">
      <a href="{{qa_link}}" class="blog-meta-text" status="{{status}}" pk_sool_question="{{pk_sool_question}}" >{{similaryQuestion_length question_title}}</a>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <span class="am-fr"><i class="fa fa-comment-o am-xiangsi"></i> &nbsp;{{answercount}}</span>
    </li>
    {{/each}}
  </ul>

</script>

<script>

  Handlebars.registerHelper("compare",function(v1,options){
    if(v1==1){
      return options.fn(this);
    }else{
      return options.inverse(this);
    }
  });

  $(document).ready(function(){
    searchClick();
    navBarStyle();
    findAll();
    similarQuestion();

    /*获取跳转*/
    var status_type = window.location.hash;
    WebSite.debug("页面加载就执行"+status_type);
    if (status_type == "#s0") {
      WebSite.debug("all这个页面的queryDataByStatus");
      findAll();
    }
    else {
      queryDataByStatus();
    }


  });

  /*根据对应的锚点加载不同的内容*/
  var queryDataByStatus = function() {
    var status_type = window.location.hash;
    WebSite.debug("queryDataByStatus这个方法："+status_type);
    if (status_type == "#s0") {
      $("#subMyAnswerList li").removeClass("am-active");
      $("#a-all").toggleClass("am-active");
      findAll();
    }
    else if (status_type == "#s1") {
      $("#subMyAnswerList li").removeClass("am-active");
      $("#a-adopt").toggleClass("am-active");
      Adopt();
    }  else if (status_type == "#s2") {
      $("#subMyAnswerList li").removeClass("am-active");
      $("#a-unadopt").toggleClass("am-active");
      unAdopt();
    }  else if (status_type == "#s3") {
      $("#subMyAnswerList li").removeClass("am-active");
      $("#a-handling").toggleClass("am-active");
      pending();
    }

  };

  $(window).on("hashchange", function(){
    queryDataByStatus();
  });
</script>

</body>
</html>
